import 'package:flutter/material.dart';
import 'package:website.home.account/account_overview_fragment/presentation/theme/theme.dart';
import 'package:website.home.account/account_page/presentation/theme/theme.dart';
import 'package:website.home.account/payment_method_fragment/presentation/theme/theme.dart';
import 'package:website.home.account/purchase_management_fragment/presentation/theme/theme.dart';
import 'package:website.home.account/transaction_history_fragment/presentation/theme/theme.dart';

class AccountThemeProvider extends StatelessWidget {
  const AccountThemeProvider({
    required this.brightness,
    required this.primaryColor,
    required this.primaryContrastingColor,
    required this.child,
    Key? key,
  }) : super(key: key);

  final Brightness brightness;
  final Color primaryColor;
  final Color primaryContrastingColor;
  final Widget child;

  @override
  Widget build(BuildContext context) {
    return AccountPageTheme(
      brightness: brightness,
      child: AccountOverviewFragmentTheme(
        brightness: brightness,
        child: PurchaseManagementFragmentTheme(
          brightness: brightness,
          primaryContrastingColor: primaryContrastingColor,
          child: PaymentMethodFragmentTheme(
            brightness: brightness,
            child: TransactionHistoryFragmentTheme(
              brightness: brightness,
              child: child,
            ),
          ),
        ),
      ),
    );
  }
}
